package com.changli02.singleton;

public class GirlFriendTest {
}


//懒汉式 单线程
class GirlFriend {
    private GirlFriend() {

    }
    private static GirlFriend instance = null;
    public static GirlFriend getInstance() {
        if(instance ==null){
            instance = new GirlFriend();
        }
        return instance;
    }
}
